<template>
  <img alt="Vue logo" src="./assets/logo.png">
  <input 
    v-model="inputText"
    placeholder="请输入内容"
    class="input-box"
  >
  <HelloWorld 
    :inputText="inputText"
    @clear="handleClear"
  />
</template>

<script>
import HelloWorld from './components/HelloWorld.vue'

export default {
  name: 'App',
  components: {
    HelloWorld
  },
  data() {
    return {
      inputText: ''
    }
  },
  methods: {
    handleClear() {
      this.inputText = '';
    }
  }
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
.input-box {
  padding: 8px;
  margin: 20px auto;
  width: 300px;
  font-size: 16px;
  display: block;
}
.display-box {
  padding: 20px;
  margin: 10px auto;
  width: 300px;
  min-height: 50px;
  text-align: left;
}
</style>
